﻿<!DOCTYPE html>
<html lang="en">
<#include "../include/resource-head.ftl"/>
<#assign active='inventoryList'/>
<body>
<#include "../include/common-top.ftl"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
    <#include "../include/common-menu.ftl"/>
        <div class="main-content">
            <div class="page-content">
                <div class="col-xs-12">
                    <div class="row-fluid">
                        <div class="widget-box">
                            <div class="widget-header widget-header-blue widget-header-flat">
                                <h4 class="lighter">
                                    <i class="icon-leaf"></i>修改库存信息
                                </h4>
                            </div>
                            <div class="widget-body">
                                <div class="widget-main">
                                    <div class="step-content row-fluid position-relative">
                                        <form class="form-horizontal" action="/inventory/update" method="post" onsubmit="return form_submit()">
                                            <input type="hidden" name="id" value="${inventory.id}">
                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">疫苗</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <select class="width-95 chosen-select" name="vaccineId">
                                                        <#list vaccineList as item>
                                                            <option value="${item.id}" <#if inventory.vaccineId == item.id>selected</#if>>${item.name}</option>
                                                        </#list>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">发放人</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100" name="sendUser" value="${inventory.sendUser}" required/>
                                                </div>
                                            </div>

                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">接收人</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100" name="receiveUser" value="${inventory.receiveUser}" required/>
                                                </div>
                                            </div>

                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">检查人</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100" name="checkUser" value="${inventory.checkUser}" required/>
                                                </div>
                                            </div>

                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">接收时间</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100 form_datetime" value="${inventory.receiveTime?string('yyyy-MM-dd')}" name="receiveTime" readonly data-date-format="yyyy-mm-dd" required/>
                                                </div>
                                            </div>

                                            <div class="form-group has-info">
                                                <label class="col-xs-12 col-sm-3 control-label no-padding-right">接收数量</label>
                                                <div class="col-xs-12 col-sm-5">
                                                    <input type="text" class="width-100" name="receiveCount" id="spinner"/>
                                                </div>
                                            </div>
                                            <hr/>
                                            <div class="row-fluid wizard-actions">
                                                <button class="btn" type="reset">重置</button>
                                                <button class="btn btn-success" type="submit">提交</button>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.page-content -->
        </div>
        <!-- /.main-content -->
    </div>
    <!-- /.main-container -->
</body>
<#assign sort= inventory.receiveCount/>
<#include "../include/resource-script.ftl"/>
<script type="text/javascript">
    function form_submit(){
        var receiveTime = $('input[name="receiveTime"]').val();
        if(receiveTime.length == 0){
            tipMsg("请输入接收时间");
            return false;
        }
        return true;
    }

</script>
</html>

